package com.pandora.templating;

import java.util.Vector;

import com.pandora.model.BuildingBlock;
import com.pandora.model.Parameter;

public abstract class BuildingBlockTemplate<T extends BuildingBlock> extends Template<T> {
	
	protected String name;
	protected String description;
	protected Vector<BuildingBlockTemplate<? extends BuildingBlock>> dependencies;
	protected ParameterTemplateTable<Parameter, ParameterTemplate<Parameter>> inParameters;
	protected ParameterTemplateTable<Parameter, ParameterTemplate<Parameter>> outParameters;
	//protected Condition executionCondition;
	protected MultipleParameterTemplate multipleParameterTemplate;
	
	public BuildingBlockTemplate(String name) {
		this(name,null);
	}
	
	public BuildingBlockTemplate(String name, String description) {
		super();
		this.name = name;
		this.description = description;
		this.dependencies = new Vector<BuildingBlockTemplate<? extends BuildingBlock>>();
		this.inParameters = new ParameterTemplateTable<Parameter, ParameterTemplate<Parameter>>();
		this.outParameters = new ParameterTemplateTable<Parameter, ParameterTemplate<Parameter>>();
		this.multipleParameterTemplate = new MultipleParameterTemplate();
		
	}
	
	public Vector<BuildingBlockTemplate<? extends BuildingBlock>> getDependencies() {
		return dependencies;
	}

	public void setDependencies(Vector<BuildingBlockTemplate<? extends BuildingBlock>> dependencies) {
		this.dependencies = dependencies;
	}

	public ParameterTemplateTable<?, ?> getInParameters() {
		return inParameters;
	}

	public void setInParameters(ParameterTemplateTable<Parameter, ParameterTemplate<Parameter>> inParameters) {
		this.inParameters = inParameters;
	}

	public ParameterTemplateTable<Parameter, ParameterTemplate<Parameter>> getOutParameters() {
		return outParameters;
	}

	public void setOutParameters(ParameterTemplateTable<Parameter, ParameterTemplate<Parameter>> outParameters) {
		this.outParameters = outParameters;
	}	

	public MultipleParameterTemplate getMultipleParameterTemplate() {
		return multipleParameterTemplate;
	}

	public void setMultipleParameterTemplate(MultipleParameterTemplate multipleParameterTemplate) {
		this.multipleParameterTemplate = multipleParameterTemplate;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
}
